<?php
/**
 * Created by PhpStorm.
 * User: baidu
 * Date: 18/2/28
 * Time: 上午1:39
 */
$http = new swoole_http_server("0.0.0.0", 8811);

$http->set(
    [
        'enable_static_handler' => true,
        'document_root' => "/home/work/study/swoole_mooc/data/server",
    ]
);
$http->on('request', function($request, $response) {
    if($request->server['request_uri'] == '/favicon.ico') {
        $response->status(404);
        $response->end();
        return;
    }

//    print_r($request->get);
    $response->end("sss". json_encode($request->get));
});

$http->start();